<script>
	export default {
    globalData: {
      wsUrl: 'ws://82.157.32.169:8889'
    },
		onLaunch: function() {
			console.log('App Launch',this.$globalVar);

		},
		onShow: function() {
			console.log('App Show',[29,'29'].includes('29'))
      // 没有连接：
      if (!this.$ws.isConnect()) {
        let username = uni.getStorageSync("im-login-username");
        if(username){
          this.$ws.connect(`${this.globalData.wsUrl}/?username=${username}&tenant=1&token=${username}`);
        }else{
          uni.navigateTo({
            url: '/pages/index/login',
            animationDuration: 300
          })
        }
      }

		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
